import { COMMENT_CREATE, COMMENT_LIST } from '@/config/url';
import request from '@/utils/request';

// 获取谷子评论列表
export const getCommentList = (data={}) => {
    const { objectId, pageNo, pageSize } = data;
    const id = objectId || '';
    const url = COMMENT_LIST.replace('{id}', id);
    return request(url, {data: {id, pageNo, pageSize}});
};

export const likeComment = (data={}) => {
    return Promise.resolve();
};

// 添加谷子评论
export const addComment = (data={}) => {
    return request(COMMENT_CREATE, {method: 'post', data});
};
